package mal.carbonization;

import java.util.List;

import net.minecraft.creativetab.CreativeTabs;
import net.minecraft.item.Item;
import net.minecraft.item.ItemStack;
import cpw.mods.fml.relauncher.Side;
import cpw.mods.fml.relauncher.SideOnly;


public class ItemFuel extends Item {

	public ItemFuel(int par1)
	{
		super(par1);
		this.hasSubtypes=true;
		this.setMaxDamage(0);
		this.setTextureFile(getTexture());
		this.setCreativeTab(CreativeTabs.tabMaterials);
	}
	
	public String getTexture()
	{
		return "/mal/carbonization/carbonizationTexture.png";
	}
	
	public int getIconFromDamage(int par1)
	{
		switch (par1)
		{
		case 0:
			return 16;
		case 1:
			return 17;
		case 2:
			return 18;
		case 3:
			return 19;
		case 4:
			return 20;
		case 5:
			return 21;
		default:
			return 0;
		}
	}
	
	public String getItemNameIS(ItemStack par1ItemStack)
	{
		String r="";
		
		switch (par1ItemStack.getItemDamage())
		{
		case 0:
			r="carbonization.peat";
			break;
		case 1:
			r="carbonization.lignite";
			break;
		case 2:
			r="carbonization.sbituminous";
			break;
		case 3:
			r="carbonization.bituminous";
			break;
		case 4:
			r="carbonization.anthracite";
			break;
		case 5:
			r="carbonization.graphite";
			break;
		default:
			r="carbonization.peat";
			break;
		}
		
		return r;
	}
	
	/**
     * returns a list of items with the same ID, but different meta (eg: dye returns 16 items)
     */
	@SideOnly(Side.CLIENT)
    public void getSubItems(int par1, CreativeTabs par2CreativeTabs, List par3List)
    {
        par3List.add(new ItemStack(par1, 1, 0));
        par3List.add(new ItemStack(par1, 1, 1));
        par3List.add(new ItemStack(par1, 1, 2));
        par3List.add(new ItemStack(par1, 1, 3));
        par3List.add(new ItemStack(par1, 1, 4));
        par3List.add(new ItemStack(par1, 1, 5));
    }
}
